package common.controls.utils
{
	
	/**  
	 * 
	 * @author carrey
	 * */ 
	public class MathUtils
	{
		public static const PI2:Number = Math.PI * 2;
		
		public function MathUtils()
		{
		}
		
		public static function scaleFit( srcWidth:Number, srcHeight:Number, desWidth:Number, desHeight:Number ):Array
		{
			var f:Number = Math.min( desWidth/srcWidth, desHeight/srcHeight );
			return [srcWidth*f, srcHeight*f];
		}
	}
}